package com.mew.lobby.provide;

import com.mew.common.rest.mail.MailDetailInfoResponseMessage;
import com.mew.common.rest.mail.MailResponseMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * @author dylin
 * @create 2021/4/6
 */
@Component
@FeignClient(value = "mew-kernel-user")
@RequestMapping(value = "/mail")
public interface MailFeignService {
    /**
     * 查询邮件列表
     */
    @PostMapping("/query")
    @ResponseBody
    MailResponseMessage getMailList(@RequestParam("userId") long userId);

    /**
     * 领取邮件
     */
    @PostMapping("/receive")
    @ResponseBody
    int receiveAward(@RequestParam("userId")long userId, @RequestParam("mailId")int mailId);

    @PostMapping("/detail_info")
    @ResponseBody
    MailDetailInfoResponseMessage getDetailInfo(@RequestParam("mailId") int mailId);
}
